<template>
  <view class="representative-personage">
    <view class="title-img-box">
      <image class="title-img" :src="partTextImgUrl" />
    </view>
    <view class="content-wrapper">
      <view class="content">
        <view class="title-box">
          <view class="black-line"> </view>
          <view class="title-en"
            >同样性格的
            <text class="spe">职业标杆</text>是你前进道路中的方向标</view
          >
        </view>
        <view class="icon-bar">
          <view
            class="icon-item"
            v-for="(item, index) in dataItem.content"
            :key="index"
          >
            <image :src="item.url" class="icon"></image>
            <text class="name">{{ item.name }}</text>
            <text class="position">{{ item.label }}</text>
          </view>
        </view>
        <!-- <view class="desc">
          {{ dataItem.desc }}
        </view> -->
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    dataItem: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      partTextImgUrl:
        this.$imgBaseSelf + 'career/careerAssessNewImg/05_title.png',
      imgPavilion:
        this.$imgBaseSelf + 'career/careerAssessResult/img_pavilion.png'
    };
  },
  mounted() {
    uni
      .createSelectorQuery()
      .in(this)
      .select('.representative-personage')
      .boundingClientRect((rect) => {
        this.$emit('listenRect', rect);
      })
      .exec();
  }
};
</script>

<style lang="scss" scoped>
.representative-personage {
  margin-top: 48rpx;
  position: relative;
  background: url($img-base + 'career/careerAssessNewImg/06_bg.png') no-repeat
    right bottom;
  width: 100%;
  .title-img-box {
    display: flex;
    .title-img {
      height: 112rpx;
      width: 405rpx;
    }
  }

  .content-wrapper {
    margin: -14rpx 32rpx 0 32rpx;
    background: #fff;
    border-radius: 0rpx 20rpx 0rpx 0rpx;
    .content {
      padding: 53rpx 42rpx 42rpx 42rpx;
      background: linear-gradient(0deg, #ffffff 0%, #fbdefe 100%) no-repeat;
      border-radius: 0rpx 20rpx 0rpx 0rpx;
      border: 1px solid #ffffff;
      background-size: 100% 83rpx;
      .title-box {
        display: flex;
        align-items: center;
        position: relative;
        .black-line {
          width: 12rpx;
          height: 37rpx;
          background: #000000;
          position: absolute;
          left: -42rpx;
        }
        .title-en {
          font-family: Source Han Sans CN;
          font-weight: 600;
          font-size: 28rpx;
          color: #070701;
          .spe {
            color: #fe5808;
          }
        }
      }
      .icon-bar {
        display: flex;
        justify-content: space-between;
        margin: 62rpx 0 0 0;
        .icon-item {
          display: flex;
          flex-direction: column;
          align-items: center;
          .icon {
            width: 147rpx;
            height: 147rpx;
            border-radius: 50%;
            margin-bottom: 36rpx;
          }
          .name {
            font-weight: 600;
            font-size: 28rpx;
            color: #aa4dc4;
            margin-bottom: 10rpx;
          }
          .position {
            font-size: 30rpx;
            color: #b193ba;
          }
        }
      }
      .desc {
        font-family: Source Han Sans CN;
        font-size: 30rpx;
        color: #888888;
        line-height: 52rpx;
        margin-top: 40rpx;
      }
    }
  }
}
</style>
